/**
 * Copyright 2009 Sergio Bossa
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package com.googlecode.actorom;

import com.googlecode.actorom.support.ActorInvocationException;

/**
 * Actors are the main abstraction implementing message-passing concurrency.
 * <br><br>
 * Messages sent to an actor are <b>asynchronously</b> and <b>sequentially</b> processed in <b>FIFO</b> order.
 * An actor, so, can have its own state which will never be shared with other actors, nor concurrently accessed.
 * <br><br>
 * In order to spawn and obtain an actor instance, you must use a {@link Topology} implementation.
 *
 * @author Sergio Bossa
 */
public interface Actor {

    /**
     * Send a generic message to this actor.
     *
     * @param message The message instance to send.
     * @throws ActorInvocationException If unable to invoke this actor.
     */
    public void send(Object message) throws ActorInvocationException;
}
